<?php
session_start();
include('userDatabase.php');

class UserController{
	public function membership(){
		if (isset($_POST['FirstName']))
			{
				$myDatabase = new UserDatabase();
				$myDatabase->add($_POST["Username"],$_POST["FirstName"],$_POST["LastName"],$_POST["UserType"],$_POST["Email"],$_POST["Password"],$_POST['retypePassword'],$_POST["CellPhone_Number"],$_POST["Address"]);
			
			}
		
	}
	public function controllPass(){
		if (isset($_POST['Username']))
			{
				$myDatabase = new UserDatabase();
				$myDatabase->sendPass($_POST["Username"], $_POST["captcha"],$_SESSION["code"]);
			}
	}
	
}
	if($_GET['id']==0)
	
	{
		$obj = new UserController();
		$obj->membership();
	}
	elseif ($_GET['id']==1)
	{
		$obj = new UserController();
		$obj->controllPass();
	}
?>